﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ViewAll.ascx.cs" Inherits="Team4Mock.UserControl.Organisation.ViewAll" %>
<%@ Import Namespace="System.Data" %>
<%@ Register Src="~/UserControl/Organisation/CreateOrg.ascx" TagName="OrgAdd" TagPrefix="uc1" %>
<style type="text/css">
    a
    {
        text-decoration: none;
    }
    #new
    {
        list-style: none;
        height: 23px;
        margin: 0px;
        padding: 0px;
    }
    #new li:first
    {
        background-color: #465c71;
        display: inline;
        color: White;
    }
    #new li a
    {
        text-decoration: none;
        color: White;
    }
    .style5
    {
        width: 164px;
        height: 32px;
    }
    .style6
    {
        height: 32px;
    }
    .style9
    {
        height: 32px;
        width: 208px;
    }
    .style11
    {
        width: 148px;
        height: 32px;
    }
    .style13
    {
        width: 208px;
    }
    .style15
    {
        width: 148px;
    }
    .style16
    {
        width: 150px;
    }
    h3
    {
        font-size: 17px;
        margin: 0px;
    }
    #txtContactID
    {
        width: 112px;
    }
    #txtBusID
    {
        width: 145px;
    }
    .button
    {
    }
    .style17
    {
        height: 34px;
    }
</style>
<script type="text/javascript">
    function PopupBusiness() {
        window.open("/FormView/PopupBusiness.aspx", "popUpWindow", 'height=500,width=800,left=300,top=100,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
    }
    function PopupAddress() {
        window.open("/FormView/PopupAddress.aspx", 'popUpWindow', 'height=500,width=800,left=300,top=100,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
    }
    function PopupContact() {
        window.open("/FormView/PopupContact.aspx", 'popUpWindow', 'height=500,width=800,left=300,top=100,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
    }
    function Error() {
        alert("Error in processing !");
        window.location.href = "/FormView/Default.aspx";
    }
</script>
<script type="text/javascript">
    function getContactID() {
        var s = document.getElementById('id').value;
        if (s != "") {
            document.getElementById('<%=idContact.ClientID%>').value = s;
        }

        var b = document.getElementById('idBus').value;
        if (b != "") {
            document.getElementById('<%=hdidBus.ClientID%>').value = b;
        }
        var p = document.getElementById('txtPostCode').value;
        if (p != "") {
            document.getElementById('<%=PostCode.ClientID%>').value = p;
        }
        var t = document.getElementById('txtTown').value;
        if (t != "") {
            document.getElementById('<%=Town.ClientID%>').value = t;
        }
        var c = document.getElementById('txtCounty').value;
        if (c != "") {
            document.getElementById('<%=County.ClientID%>').value = c;
        }
        var sic = document.getElementById('txtSICCode').value;
        if (sic != "") {
            document.getElementById('<%=hdsic.ClientID%>').value = sic;
        }
    }
</script>
<script type="text/javascript">
    $(document).ready(function () {

        $(".tab_content").hide();
        $("ul.tabs li:first").addClass("active").show();
        $(".tab_content:first").show();

        $("ul.tabs li").click(function () {

            $("ul.tabs li").removeClass("active");
            $(this).addClass("active");
            $(".tab_content").hide();

            var activeTab = $(this).find("a").attr("href");
            $(activeTab).slideDown();
            return false;
        });
    });
</script>
<div style="width: 800px; margin-top: 10px;">
    <fieldset style="margin-left: 10px; width: 760px;">
        <legend style="height: 25px; background-color: #465c71; -webkit-border-radius: 5px 5px 0px 0px;
            color: #dde4ec; font-size: 18px;">Organisation List</legend>
        <asp:Panel ID="pngv" runat="server">
            <div style="width: 550px; float: left; height: 32px; line-height: 32px;">
                <asp:LinkButton ID="All" runat="server" Text="All" OnClick="All_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton2" runat="server" Text="A-B-C-D-E" OnClick="LinkButton2_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton3" runat="server" Text="F-G-H-I-J" OnClick="LinkButton3_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton4" runat="server" Text="K-M-N-L" OnClick="LinkButton4_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton5" runat="server" Text="O-P-Q-R" OnClick="LinkButton5_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton6" runat="server" Text="S-T-U-V" OnClick="LinkButton6_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton7" runat="server" Text="W-X-Y-Z" OnClick="LinkButton7_Click"></asp:LinkButton>
            </div>
            <div style="width: 202px; float: left; height: 32px; line-height: 32px;">
                <asp:Button ID="btnCreate" runat="server" Text="Create" CssClass="button" OnClick="btnCreate_Click" />&nbsp;&nbsp;
                <asp:CheckBox ID="ckActive" runat="server" AutoPostBack="true" Text="In-active" OnCheckedChanged="ckActive_CheckedChanged" />
            </div>
            <div style="width: 784px; float: left;">
                <asp:UpdatePanel ID="pnanel" runat="server">
                    <ContentTemplate>
                        <asp:GridView ID="gvOrg" AutoGenerateColumns="False" DataKeyNames="ID" runat="server"
                            Width="765px" BackColor="White" BorderColor="#CCCCCC" AllowSorting="true" OnSorting="gvOrg_Sorting"
                            BorderStyle="None" AllowPaging="true" PageSize="15" BorderWidth="1px" CellPadding="3" OnPageIndexChanging="gvOrg_PageIndexChanging">
                            <Columns>
                                <asp:TemplateField HeaderText="ID" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lbID" runat="server" Text='<%#Eval("ID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Organisation Name" SortExpression="Name">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="OrgName" runat="server" Text='<%#Eval("Name") %>' NavigateUrl='<%#"/FormView/Organisation.aspx?"+"ID="+Eval("ID") %>'></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Head Office Address Line 1" SortExpression="Address">
                                    <ItemTemplate>
                                        <asp:Label ID="lbHOA" runat="server" Text='<%#Eval("Address") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Post Code" SortExpression="Postcode">
                                    <ItemTemplate>
                                        <asp:Label ID="lbPostcode" runat="server" Text='<%#Eval("Postcode") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Contact" SortExpression="Contact">
                                    <ItemTemplate>
                                        <asp:Label ID="lbContact" runat="server" Text='<%#Eval("Contact") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Is Active" SortExpression="IsActive">
                                    <ItemTemplate>
                                        <asp:Label ID="lbActive" runat="server" Text='<%#Eval("IsActive") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" />
                            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <RowStyle ForeColor="#000066" />
                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                        <p style="width: 765px; background-color: lavender; line-height: 25px;">
                            <asp:Label ID="abc" runat="server" Style="font-size: 15px;"></asp:Label>
                        </p>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="gvOrg" EventName="Sorting" />
                        <asp:AsyncPostBackTrigger ControlID="All" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton2" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton3" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton4" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton5" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton6" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton7" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="ckActive" EventName="CheckedChanged" />
                    </Triggers>
                </asp:UpdatePanel>
                <asp:UpdateProgress ID="pro" runat="server" AssociatedUpdatePanelID="pnanel">
                </asp:UpdateProgress>
            </div>
        </asp:Panel>
        <asp:Panel ID="pnct" runat="server" Width="760px">
            <div style="width: 760px;">
                <ul class="tabs" style="width: 760px; float: left;">
                    <li><a href="#Details1" class="tab">Details1</a></li>
                    <li><a href="#Details2" class="tab">Details2</a></li>
                    <asp:Label runat="server" ID="lbdiv"></asp:Label>
                    <li><a href="#Details4" class="tab">Details4</a></li>
                    <li><a href="#Details5" class="tab">Details5</a></li>
                    <li><a href="#Directorate" class="tab">BU/Directorates</a></li>
                </ul>
                <br />
                <div class="tab_container">
                    <div id="Details1" class="tab_content">
                        <table width="760px" cellpadding="0px" cellspacing="0px" border="0" style="font-size: 15px;">
                            <tr>
                                <td class="style5">
                                    Organisation Name <span style="color: Red;">(*)</span>
                                </td>
                                <td class="style9">
                                    <asp:TextBox ID="txtOrgName" runat="server" Width="186px"></asp:TextBox>
                                </td>
                                <td class="style11">
                                    Preferred Organisation
                                </td>
                                <td class="style6">
                                    <asp:CheckBox ID="ckPreferred" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td rowspan="2" class="style16">
                                    Organisation Short Description <span style="color: Red;">(*)</span>
                                </td>
                                <td rowspan="2" class="style13">
                                    <asp:TextBox ID="txtShortDes" runat="server" TextMode="MultiLine" Height="63px" Width="186px"
                                        Style="margin-left: 0px"></asp:TextBox>
                                </td>
                                <td class="style15">
                                    Expression of interest
                                </td>
                                <td>
                                    <asp:CheckBox ID="ckExpress" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td class="style15">
                                    Type of Business <span style="color: Red;">(*)</span>
                                </td>
                                <td>
                                    <input type="text" id="txtBusID" readonly="readonly" />
                                    &nbsp;&nbsp;<a href="#" onclick="PopupBusiness();return false;">Lookup</a>
                                </td>
                            </tr>
                            <tr>
                                <td class="style16">
                                    Lead Contact
                                </td>
                                <td class="style13">
                                    <input type="text" id="Name" readonly="readonly" style="width: 104px" />
                                    <input type="hidden" id="id" />
                                    &nbsp;&nbsp; <a href="#" onclick="PopupContact();return false;">Lookup</a>
                                    <asp:HiddenField ID="idContact" runat="server" />
                                </td>
                                <td class="style15">
                                    SIC Code
                                </td>
                                <td>
                                    <input type="text" id="txtSICCode" readonly="readonly" style="width: 176px;">
                                    <input type="hidden" id="idBus">
                                    <asp:HiddenField ID="hdidBus" runat="server" />
                                    <asp:HiddenField ID="hdsic" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Address Line 1 <span style="color: Red; text-decoration: blink;">(*)</span>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtAdd1" runat="server" Width="186px"></asp:TextBox>
                                </td>
                                <td>
                                    Description Full
                                </td>
                                <td>
                                    <asp:TextBox ID="txtFullDes" runat="server" Height="32px" Width="176px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Address Line 2
                                </td>
                                <td>
                                    <asp:TextBox ID="txtAdd2" runat="server" Width="186px"></asp:TextBox>
                                </td>
                                <td>
                                    Phone Number <span style="color: Red;">(*)</span>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtPhone" runat="server" Width="176px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Address Line 3
                                </td>
                                <td>
                                    <asp:TextBox ID="txtAdd3" runat="server" Width="186px"></asp:TextBox>
                                </td>
                                <td>
                                    Fax
                                </td>
                                <td>
                                    <asp:TextBox ID="txtFax" runat="server" Width="176px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Post Code <span style="color: Red;">(*)</span>
                                </td>
                                <td>
                                    <input type="text" id="txtPostCode" style="width: 117px;" readonly="readonly" />
                                    &nbsp;&nbsp;<a href="#" onclick="PopupAddress();return false;">Lookup</a>
                                    <asp:HiddenField ID="PostCode" runat="server" />
                                </td>
                                <td>
                                    Web Address
                                </td>
                                <td>
                                    <asp:TextBox ID="txtWeb" runat="server" Width="176px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    City/Town
                                </td>
                                <td>
                                    <input type="text" id="txtTown" style="width: 186px;" />
                                    <asp:HiddenField ID="Town" runat="server" />
                                </td>
                                <td>
                                    Charity Number
                                </td>
                                <td>
                                    <asp:TextBox ID="txtCharity" runat="server" Width="176px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    County
                                </td>
                                <td>
                                    <input type="text" id="txtCounty" style="width: 186px;" />
                                    <asp:HiddenField ID="County" runat="server" />
                                </td>
                                <td>
                                    Company Number
                                </td>
                                <td>
                                    <asp:TextBox ID="txtCompany" runat="server" Width="176px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Nation/Country
                                </td>
                                <td>
                                    <asp:DropDownList ID="dlNational" AutoPostBack="false" DataTextField="CountryName"
                                        DataValueField="CountryName" runat="server" Width="186px">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    Is Active?
                                </td>
                                <td>
                                    <asp:CheckBox ID="ckIsactive" runat="server" />
                                </td>
                            </tr>
                            
                        </table>
                        <p style="width: 765px; background-color: lavender; line-height: 25px;">
                            <asp:Label ID="Label2" runat="server" Style="font-size: 15px;"></asp:Label>
                        </p>
                    </div>
                </div>
                <div class="tab_container">
                    <div id="Details2" class="tab_content">
                        <table width="760px" cellpadding="0px" cellspacing="0px" border="0" style="font-size: 15px;">
                            <tr>
                                <td width="200px" style="border-bottom: 1px solid #cccccc;">
                                    Organisation Specicalism
                                </td>
                                <td style="border-bottom: 1px solid #cccccc; width: 190px; height: 100px;">
                                    <asp:CheckBoxList ID="clOrgSpe" runat="server" Width="177px" Height="100px">
                                    </asp:CheckBoxList>
                                </td>
                                <td width="180px" style="border-bottom: 1px solid #cccccc;">
                                    Service Personal Circumstances Capabilities
                                </td>
                                <td style="border-bottom: 1px solid #cccccc; width: 190px; height: 100px;">
                                    <asp:CheckBoxList ID="clSerPerCirCap" runat="server" Width="143px" Height="100px">
                                    </asp:CheckBoxList>
                                </td>
                            </tr>
                            <tr>
                                <td width="200px" style="border-bottom: 1px solid #cccccc;">
                                    Service Disablities Capabilites
                                </td>
                                <td style="border-bottom: 1px solid #cccccc; width: 190px; height: 100px;">
                                    <asp:CheckBoxList ID="clSerDisCap" runat="server" Width="171px" Height="100px">
                                    </asp:CheckBoxList>
                                </td>
                                <td width="180px" style="border-bottom: 1px solid #cccccc;">
                                    Service Ethnicity Capabilities
                                </td>
                                <td style="border-bottom: 1px solid #cccccc; width: 190px; height: 100px;">
                                    <asp:CheckBoxList ID="clSerEthCap" runat="server" Width="143px" Height="100px">
                                    </asp:CheckBoxList>
                                </td>
                            </tr>
                            <tr>
                                <td width="200px" style="border-bottom: 1px solid #cccccc;">
                                    Service Barriers Capabilities
                                </td>
                                <td style="border-bottom: 1px solid #cccccc; width: 190px; height: 100px;">
                                    <asp:CheckBoxList ID="clSerBarCap" runat="server" Width="169px" Height="100px">
                                    </asp:CheckBoxList>
                                </td>
                                <td width="180px" style="border-bottom: 1px solid #cccccc;">
                                    Accreditation
                                </td>
                                <td style="border-bottom: 1px solid #cccccc; width: 190px; height: 100px;">
                                    <asp:CheckBoxList ID="clAcc" runat="server" Width="143px" Height="100px">
                                    </asp:CheckBoxList>
                                </td>
                            </tr>
                            <tr>
                                <td width="200px" style="border-bottom: 1px solid #cccccc;">
                                    Service Benefits Capabilities
                                </td>
                                <td style="border-bottom: 1px solid #cccccc; width: 190px; height: 100px;">
                                    <asp:CheckBoxList ID="clSerBenCap" runat="server" Width="174px" Height="100px">
                                    </asp:CheckBoxList>
                                </td>
                                <td style="border-bottom: 1px solid #cccccc;">
                                </td>
                                <td style="border-bottom: 1px solid #cccccc;">
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="tab_container">
                    <div id="Details3" class="tab_content">
                        <table width="760px" cellpadding="0px" cellspacing="0px" border="0" style="font-size: 15px;">
                            <tr>
                                <td width="200px" style="border-bottom: 1px solid #cccccc;">
                                    EOI Programmes
                                </td>
                                <td style="border-bottom: 1px solid #cccccc;">
                                    <asp:CheckBoxList ID="clEOIPro" runat="server" Width="175px" Height="100px">
                                    </asp:CheckBoxList>
                                </td>
                            </tr>
                            <tr>
                                <td width="180px" style="border-bottom: 1px solid #cccccc;">
                                    EOI Service
                                </td>
                                <td style="border-bottom: 1px solid #cccccc;">
                                    <asp:CheckBoxList ID="clEOISer" runat="server" Width="157px" Height="100px">
                                    </asp:CheckBoxList>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="tab_container">
                    <div id="Details4" class="tab_content">
                        <fieldset style="width: 700px; margin-left: 0px;">
                            <legend>Premise</legend>
                            <asp:GridView ID="gvPremise" AutoGenerateColumns="False" DataKeyNames="ID" runat="server"
                                Width="709px" Font-Size="15px" BackColor="White" BorderColor="#CCCCCC" AllowSorting="true"
                                BorderStyle="None" BorderWidth="1px" CellPadding="3">
                                <Columns>
                                    <asp:TemplateField HeaderText="ID" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lbID" runat="server" Text='<%#Eval("ID") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Location Name">
                                        <ItemTemplate>
                                            <asp:HyperLink ID="OrgName" runat="server" NavigateUrl='<%#"/FormView/Premise.aspx?"+"ID="+Eval("ID") %>'
                                                Text='<%#Eval("Name") %>'></asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Address Line 1">
                                        <ItemTemplate>
                                            <asp:Label ID="lbHOA" runat="server" Text='<%#Eval("Address") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Post Code">
                                        <ItemTemplate>
                                            <asp:Label ID="lbPostcode" runat="server" Text='<%#Eval("Postcode") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Is Active">
                                        <ItemTemplate>
                                            <asp:Label ID="lbActive" runat="server" Text='<%#Eval("IsActive") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <FooterStyle BackColor="White" ForeColor="#000066" />
                                <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                <RowStyle ForeColor="#000066" />
                                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                            </asp:GridView>
                        </fieldset>
                        <fieldset style="width: 700px; font-size: 15px;">
                            <legend>Located In</legend>
                            <table cellpadding="0" cellspacing="0" border="0" width="700px">
                                <tr>
                                    <td>
                                        Ward
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtWard" ReadOnly="true" runat="server" Width="176px"></asp:TextBox>
                                    </td>
                                    <td>
                                        NHS Authority
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtNHS" ReadOnly="true" runat="server" Width="175px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Borough
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtBorough" ReadOnly="true" runat="server" Width="176px"></asp:TextBox>
                                    </td>
                                    <td>
                                        Govt Office Region
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="dlGov" Width="176px" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Local Authority
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtLocalAutho" ReadOnly="true" runat="server" Width="176px"></asp:TextBox>
                                    </td>
                                    <td>
                                        Trust Region
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="dlTrustRegion" Width="176px" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Unitary Authority
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtUniAutho" ReadOnly="true" runat="server" Width="176px"></asp:TextBox>
                                    </td>
                                    <td>
                                        Trust District
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="dlTrustDistrict" Width="176px" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                    </div>
                </div>
                <div class="tab_container">
                    <div class="tab_content" id="Details5">
                        <asp:Panel runat="server" ID="ViewSupport">
                            <span style="font-size: 15px;">Current List Support Material</span>
                            <asp:Button ID="btnCreateSup" runat="server" Text="Create" CssClass="button" OnClick="btnCreateSup_Click" />
                            <asp:GridView ID="gvSupport" AutoGenerateColumns="False" DataKeyNames="SupportMaterialID"
                                runat="server" Width="709px" Font-Size="15px" BackColor="White" BorderColor="#CCCCCC"
                                AllowSorting="true" BorderStyle="None" BorderWidth="1px" CellPadding="3">
                                <Columns>
                                    <asp:TemplateField HeaderText="ID" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lbID" runat="server" Text='<%#Eval("SupportMaterialID") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="URL">
                                        <ItemTemplate>
                                            <asp:HyperLink ID="url" runat="server" NavigateUrl='<%#"/FormView/Support.aspx?"+"s="+Eval("SupportMaterialID")+"&ID="+Request.QueryString["ID"] %>'
                                                Text='<%#Eval("URL") %>'></asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Description">
                                        <ItemTemplate>
                                            <asp:Label ID="Des" runat="server" Text='<%#Eval("Description") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Type">
                                        <ItemTemplate>
                                            <asp:Label ID="Type" runat="server" Text='<%#Eval("SupMatType") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Added Date">
                                        <ItemTemplate>
                                            <asp:Label ID="Adddate" runat="server" Text='<%#Eval("AddedDate") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Is Active">
                                        <ItemTemplate>
                                            <asp:Label ID="isactive" runat="server" Text='<%#Eval("IsActive") %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <FooterStyle BackColor="White" ForeColor="#000066" />
                                <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                <RowStyle ForeColor="#000066" />
                                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                            </asp:GridView>
                        </asp:Panel>
                    </div>
                </div>
                <div class="tab_container">
                    <div id="Directorate" class="tab_content">
                        <div style="width: 509px; float: left; height: 32px; font-size: 15px; line-height: 32px;">
                            <asp:LinkButton ID="LAll" runat="server" Text="All" OnClick="LAll_Click"></asp:LinkButton>&nbsp;&nbsp;|
                            <asp:LinkButton ID="LAE" runat="server" Text="A-B-C-D-E" OnClick="LAE_Click"></asp:LinkButton>&nbsp;&nbsp;|
                            <asp:LinkButton ID="LFJ" runat="server" Text="F-G-H-I-J" OnClick="LFJ_Click"></asp:LinkButton>&nbsp;&nbsp;|
                            <asp:LinkButton ID="LKL" runat="server" Text="K-M-N-L" OnClick="LKL_Click"></asp:LinkButton>&nbsp;&nbsp;|
                            <asp:LinkButton ID="LOR" runat="server" Text="O-P-Q-R" OnClick="LOR_Click"></asp:LinkButton>&nbsp;&nbsp;|
                            <asp:LinkButton ID="LSV" runat="server" Text="S-T-U-V" OnClick="LSV_Click"></asp:LinkButton>&nbsp;&nbsp;|
                            <asp:LinkButton ID="LWZ" runat="server" Text="W-X-Y-Z" OnClick="LWZ_Click"></asp:LinkButton>
                        </div>
                        <div style="float: left; height: 32px; line-height: 32px;">
                            <asp:Button ID="Button1" runat="server" Text="Create" CssClass="button" OnClick="Button1_Click" />&nbsp;&nbsp;
                            <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="true" Text="In-active"
                                OnCheckedChanged="CheckBox1_CheckedChanged" />
                        </div>
                        <div style="width: 784px;">
                            <asp:UpdatePanel ID="UpdatePanel11" runat="server">
                                <ContentTemplate>
                                    <asp:GridView ID="gvDirectorate" AutoGenerateColumns="False" DataKeyNames="DirectorateID"
                                        runat="server" Width="709px" Font-Size="15px" BackColor="White" BorderColor="#CCCCCC"
                                        AllowSorting="true" BorderStyle="None" BorderWidth="1px" CellPadding="3" OnSorting="gvDirectorate_Sorting"
                                        AllowPaging="True">
                                        <Columns>
                                            <asp:TemplateField HeaderText="ID" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lbID" runat="server" Text='<%#Eval("DirectorateID") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Directorate Name" SortExpression="DirectorateName">
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="OrgName" runat="server" NavigateUrl='<%#"/FormView/Directorate.aspx?"+"s="+Eval("DirectorateID")+"&ID="+Request.QueryString["ID"] %>'
                                                        Text='<%#Eval("DirectorateName") %>'></asp:HyperLink>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Head Office Address Line 1" SortExpression="AddressLine1">
                                                <ItemTemplate>
                                                    <asp:Label ID="lbHOA" runat="server" Text='<%#Eval("AddressLine1") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Post Code" SortExpression="Postcode">
                                                <ItemTemplate>
                                                    <asp:Label ID="lbPostcode" runat="server" Text='<%#Eval("Postcode") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Contact" SortExpression="Contact">
                                                <ItemTemplate>
                                                    <asp:Label ID="lbContact" runat="server" Text='<%#Eval("Contact") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Is Active">
                                                <ItemTemplate>
                                                    <asp:Label ID="lbActive" runat="server" Text='<%#Eval("IsActive") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                        <FooterStyle BackColor="White" ForeColor="#000066" />
                                        <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                        <RowStyle ForeColor="#000066" />
                                        <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                    </asp:GridView>
                                    <p style="width: 709px; background-color: lavender; line-height: 25px;">
                                        <asp:Label ID="lbDirec" runat="server" Style="font-size: 15px;"></asp:Label>
                                    </p>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="gvDirectorate" EventName="Sorting" />
                                    <asp:AsyncPostBackTrigger ControlID="LAll" EventName="Click" />
                                    <asp:AsyncPostBackTrigger ControlID="LAE" EventName="Click" />
                                    <asp:AsyncPostBackTrigger ControlID="LFJ" EventName="Click" />
                                    <asp:AsyncPostBackTrigger ControlID="LKL" EventName="Click" />
                                    <asp:AsyncPostBackTrigger ControlID="LOR" EventName="Click" />
                                    <asp:AsyncPostBackTrigger ControlID="LSV" EventName="Click" />
                                    <asp:AsyncPostBackTrigger ControlID="LWZ" EventName="Click" />
                                    <asp:AsyncPostBackTrigger ControlID="CheckBox1" EventName="CheckedChanged" />
                                    <asp:AsyncPostBackTrigger ControlID="gvDirectorate" EventName="PageIndexChanging" />
                                </Triggers>
                            </asp:UpdatePanel>
                            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel11">
                            </asp:UpdateProgress>
                        </div>
                    </div>
                </div>
                <asp:Button ID="btnDel" runat="server" Text="Delete" CssClass="button" OnClick="btnDel_Click" />
                <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="button" OnClick="btnSave_Click" />
                <asp:Button ID="btnBack" runat="server" Text="Back" CssClass="button" OnClick="btnBack_Click" />
                <br />
                <asp:Label ID="tb" runat="server"></asp:Label>
            </div>
        </asp:Panel>
        <asp:Panel ID="pnCreate" runat="server">
            <uc1:OrgAdd ID="AddOrg" runat="server" />
        </asp:Panel>
    </fieldset>
</div>
